`ifndef TEST_SV
`define TEST_SV

`include "transaction.svh"

module automatic test;
	initial begin
		trans_a tra;
		trans_b trb;
		trb = new(1, 2); // 创建一个派生类对象
		tra = trb; // 基类句柄指向派生类对象
		// tra.b = 3; // 编译出错，基类trans_a中没有属性b
		tra.print("tra"); // 调用trans_b::print
		trb.print("trb"); // 调用trans_b::print
	end
endmodule

`endif
